﻿using Caliburn.Micro;

namespace SS.WPF.Framework.ViewModel.Screen
{
    /// <summary>
    /// The class is used as a provider to provide data
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class EntityViewModel<T> : PropertyChangedBase
    {
        private T _data;

        /// <summary>
        /// Gets Data.
        /// </summary>
        public T Data
        {
            get
            {
                return this._data;
            }

            set
            {
                this._data = value;
                this.NotifyOfPropertyChange(() => this.Data);
            }
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="EntityViewModel{T}"/> class.
        /// </summary>
        /// <param name="data">
        /// The data.
        /// </param>
        protected EntityViewModel(T data)
        {
            this._data = data;
        }
    }
}
